<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="../_frag/include.inc.jsp"%>
<div class="pageContent">
    <form method="post" action="${pageContext.request.contextPath}/admin/product/save?navTabId=userLiNav&callbackType=closeCurrent" class="pageForm required-validate" onsubmit="return validateCallback(this,navTabAjaxDone);">
        <input type="hidden" name="id" value="${product.id}"/>
        <div class="pageFormContent" layoutH="57">
            <p>
                <label>平台: </label>
                ${product.platformId}
    			<input type="hidden" name="platformId" value="${product.platformId}">
            </p>
            <p>
                <label>产品名称: </label>
                <input type="text" name="name" value="${product.name}" class="required" minlength="1" maxlength="100"/>
            </p>
            <p>
                <label>收益率: </label>
                <input type="text" name="yieldRate" value="${product.yieldRate}" class="required number" maxlength="10"/>
            </p>
            <p>
                <label>期限: </label>
                <input type="text" name="timeLimit" value="${product.timeLimit}" class="required integer" maxlength="100"/>
            </p>
            <p>
                <label>金额: </label>
                <input type="text" name="amount" value="${product.amount}" class="required integer" maxlength="100"/>
            </p>
            <p>
                <label>产品类别: </label>
                <input type="text" name="classify" value="${product.classify}" class="required" maxlength="50"/>
            </p>
            <p>
                <label>还款方式: </label>
                <input type="text" name="repaymentType" value="${product.repaymentType}" class="required" maxlength="50"/>
            </p>
            <p>
                <label>进度: </label>
                <input type="text" name="progress" value="${product.progress}" class="required" maxlength="30"/>
            </p>
            <p>
                <label>产品源url: </label>
                <input type="text" name="originUrl" value="${product.originUrl}" class="required url" maxlength="100"/>
            </p>
            <p>
                <label>状态: </label>
                <select name="status">
                    <option value="0" <c:if test="${product.status == 0}">selected</c:if>>下架</option>
                    <option value="1" <c:if test="${product.status == 1}">selected</c:if>>上架</option>
                </select>
            </p>
        </div>

        <div class="formBar">
            <ul>
                <li><div class="buttonActive"><div class="buttonContent"><button type="submit">保存</button></div></div></li>
                <li><div class="button"><div class="buttonContent"><button type="button" class="close">关闭</button></div></div></li>
            </ul>
        </div>
    </form>
</div>